#include <stdio.h>
#include "light.h"
#include "common.h"

// 解用 灯的 读写函数
int light_on(void *self)
{
    printf("\n------ light_on ------\n");
    return (*(Light_i **)self)->on(self);
}

int light_off(void *self)
{
    printf("\n------ light_off ------\n");
    return (*(Light_i **)self)->off(self);
}

int light_get_state(void *self, int * state)
{
    printf("\n------ light_get_state ------\n");
    return (*(Light_i **)self)->get_state(self, state);
}
